const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports = function (app) {
  app.use(
    '/jian',
    createProxyMiddleware({
      target: 'https://www.jianshu.com/asimov', //代理的地址
      changeOrigin: true,
      pathRewrite: {
        '^/jian': '', // 将请求路径中的 "/jian" 替换为 ""
      },
    })
  );
};
